package com.wuseguang.springcloud.service;

import com.wuseguang.springcloud.Filter.RequestParameterWrapper;
import com.wuseguang.springcloud.entity.*;
import com.wuseguang.springcloud.service.impl.JurisdictionClientFallbackFactory;
import com.wuseguang.springcloud.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "MICROSERVICECLOUD-JURISDICTION"/*, fallbackFactory = JurisdictionClientFallbackFactory.class*/)
public interface JurisdictionClientService {


    @RequestMapping(value = "/jurisdiction/findRolePermissions")
    Result findRolePermissions(@RequestParam(value = "indexNo") Integer indexNo,
                               @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/jurisdiction/findRoleFunction")
    Result findRoleFunction(@RequestParam(value = "roleId") Integer roleId);

    @RequestMapping("/jurisdiction/addAndDeleteRoleJurisdiction")
    Result addAndDeleteRoleJurisdiction(@RequestParam(value = "groupingId") Integer groupingId, @RequestParam(value = "jurisdictionId") Integer[] jurisdictionId);

    @RequestMapping("/jurisdiction/updateRoleName")
    Result updateRoleName(@RequestParam(value = "roleId") Integer roleId, @RequestParam(value = "name") String name, @RequestParam(value = "schoolId") Integer schoolId);

    @RequestMapping("/jurisdiction/deleteRole")
    Result deleteRole(@RequestParam(value = "roleId", required = false) Integer roleId, @RequestParam(value = "schoolId") Integer schoolId);

    @RequestMapping("/jurisdiction/addRole")
    Result addRole(Roles roles);

    @RequestMapping("/jurisdiction/findRoleDataPermissions")
    Result findRoleDataPermissions(@RequestParam(value = "roleId", required = false) Integer roleId);

    @RequestMapping("/jurisdiction/addAndUpdateRoleDataPermissions")
    Result addAndUpdateRoleDataPermissions(@RequestParam(value = "roleId", required = false) Integer roleId, @RequestParam(value = "dpid", required = false) Integer dpid);

    @RequestMapping("/jurisdiction/findGrouping")
    Result findGrouping();

    @RequestMapping("/jurisdiction/updateGrouping")
    Result updateGrouping(Grouping grouping);

    @RequestMapping("/jurisdiction/deleteGrouping")
    Result deleteGrouping(@RequestParam("id") Integer id);


    @RequestMapping("/jurisdiction/findStudentAttend")
    Result findStudentAttend(@RequestParam(value = "classId") String classId,
                             @RequestParam(value = "dateTime", required = false) String dateTime);

    @RequestMapping("/jurisdiction/queryStudentAttend")
    Result queryAttendAll(@RequestParam(value = "attendGroupId") String attendGroupId,
                          @RequestParam(value = "dateTime") String dateTime,
                          @RequestParam(value = "classId", required = false) String classId);

    @RequestMapping("/jurisdiction/findAttendByStudentId")
    Result findAttendByStudentId(@RequestParam(value = "id") String id,
                                 @RequestParam(value = "dateTime", required = false) String dateTime);

    @RequestMapping("/jurisdiction/queryAttendByStudentId")
    Result queryAttendByStudentId(@RequestParam(value = "id") String id,
                                  @RequestParam(value = "dateTime", required = false) String dateTime);

    @RequestMapping("/jurisdiction/findAttendanceNotice")
    Result findAttendanceNotice(@RequestParam(value = "classId", required = false) String[] classId,
                                @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/jurisdiction/findClassNotice")
    Result findClassNotice(@RequestParam(value = "classId", required = false) String[] classId,
                           @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                           @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/jurisdiction/findStudentAttendanceNotice")
    Result findStudentAttendanceNotice(@RequestParam(value = "studentId") Integer studentId);

    @RequestMapping("/jurisdiction/findStudentNotice")
    Result findStudentNotice(@RequestParam(value = "studentId") Integer studentId);


    @RequestMapping("/jurisdiction/findStudentInAndOutByStudentId")
    Result findStudentInAndOutByStudentId(@RequestParam(value = "id") Integer id);

    @RequestMapping("/jurisdiction/findUserTemplateClick")
    Result findUserTemplateClick(@RequestParam(value = "type") Integer type);

    @RequestMapping("/jurisdiction/addUserTemplate")
    Result addUserTemplate(@RequestParam("id") Integer id[],
                           @RequestParam("type") Integer type);

    @RequestMapping("/jurisdiction/queryFunctionFindAll")
    Result queryFunctionFindAll(@RequestParam(value = "schoolId") Integer schoolId);

    @RequestMapping("/jurisdiction/queryTeacherInformationById")
    Result queryTeacherInformationById(@RequestParam(value = "id") Integer id);

    @RequestMapping("/jurisdiction/updateTeacherChangePasswordById")
    Result updateTeacherChangePasswordById(@RequestParam(value = "id") Integer id, @RequestParam(value = "password") String password);

    @RequestMapping("/jurisdiction/queryParentInformationById")
    Result queryParentInformationById(@RequestParam(value = "id") Integer id);

    @RequestMapping("/jurisdiction/updateParentChangePasswordById")
    Result updateParentChangePasswordById(@RequestParam(value = "id") Integer id, @RequestParam(value = "password") String password, @RequestParam(value = "type") Integer type);

    @RequestMapping("/jurisdiction/updateTeacherHeadPortrait")
    Result updateTeacherHeadPortrait(@RequestParam(value = "id") Integer id, @RequestParam(value = "headPortrait") String headPortrait);

    @RequestMapping("/jurisdiction/updateStudentHeadPortrait")
    Result updateStudentHeadPortrait(@RequestParam(value = "id") Integer id, @RequestParam(value = "headPortrait") String headPortrait);

    @RequestMapping("/jurisdiction/queryAppletFunctions")
    Result queryAppletFunctions();

    @RequestMapping("/jurisdiction/queryAppletStatisticsList")
    Result queryAppletStatisticsList();

    @RequestMapping("/jurisdiction/queryTeacherPhoneBook")
    Result queryTeacherPhoneBook();

    @RequestMapping("/jurisdiction/updateTeacherPhoneBook")
    Result updateTeacherPhoneBook(@RequestParam(value = "id") String id,
                                  @RequestParam(value = "state") Integer state);

    @RequestMapping("/jurisdiction/queryParentPhoneBook")
    Result queryParentPhoneBook(@RequestParam(value = "classId", required = false) Integer classId,
                                @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/jurisdiction/queryTeacherPhoneBookBystudentId")
    Result queryTeacherPhoneBookBystudentId(@RequestParam(value = "studentId") Integer studentId);

    @RequestMapping("/jurisdiction/queryStudentNoticeList")
    Result queryStudentNoticeList(@RequestParam(value = "studentId") Integer studentId,
                                  @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                  @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/jurisdiction/queryStudentPictureList")
    Result queryStudentPictureList(@RequestParam(value = "studentId") Integer studentId,
                                   @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                   @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/jurisdiction/queryStudentVideoList")
    Result queryStudentVideoList(@RequestParam(value = "studentId") Integer studentId,
                                 @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                 @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/jurisdiction/findPersonalPerformance")
    Result findPersonalPerformance(@RequestParam(value = "studentId", required = false) Integer studentId,
                                   @RequestParam(value = "findType", required = false, defaultValue = "0") Integer findType,
                                   @RequestParam(value = "startTime", required = false) String startTime,
                                   @RequestParam(value = "endTime", required = false) String endTime,
                                   @RequestParam(value = "teacherId", required = false) Integer teacherId);

    @RequestMapping("/jurisdiction/findClassTeacher")
    Result findClassTeacher(@RequestParam(value = "classId") Integer classId);

    @RequestMapping("/jurisdiction/findDepartmentTeacher")
    Result findDepartmentTeacher();

    @RequestMapping("/jurisdiction/queryParentActivitiyList")
    Result queryParentActivitiyList(@RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                    @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/jurisdiction/addParentActivitiy")
    Result addParentActivitiy(@RequestParam(value = "classId") Integer classId,//班级id
                              @RequestParam(value = "stime") String stime,//开始时间
                              @RequestParam(value = "etime") String etime,//结束时间
                              @RequestParam(value = "name") String name,//活动主题
                              @RequestParam(value = "state") String state);

    @RequestMapping("/jurisdiction/updateParentActivitiy")
    Result updateParentActivitiy(@RequestParam(value = "id") Integer id,//活动id
                                 @RequestParam(value = "classId") Integer classId,//班级id
                                 @RequestParam(value = "stime") String stime,//开始时间
                                 @RequestParam(value = "etime") String etime,//结束时间
                                 @RequestParam(value = "name") String name);

    @RequestMapping("/jurisdiction/updateParentActivitiyStart")
    Result updateParentActivitiyStart(@RequestParam(value = "id") Integer id,//活动id
                                      @RequestParam(value = "start") Integer start,//0为 未开始 1为开始
                                      @RequestParam(value = "classId") Integer classId);

    @RequestMapping("/jurisdiction/delParentActivitiy")
    Result delParentActivitiy(@RequestParam(value = "id") Integer id);

    @RequestMapping("/jurisdiction/queryActivitiyArrived")
    Result queryActivitiyArrived(@RequestParam(value = "id") Integer id,//活动id
                                 @RequestParam(value = "type") Integer type);

    @RequestMapping("/jurisdiction/queryActivitiyByStudentId")
    Result queryActivitiyByStudentId(@RequestParam(value = "studentId") Integer studentId);

    @RequestMapping("/jurisdiction/addSigned")
    Result addSigned(@RequestParam(value = "id") Integer id,//活动id
                     @RequestParam(value = "time") String time,//二维码生成时间
                     @RequestParam(value = "studentId") Integer studentId);

    @RequestMapping("/jurisdiction/deleteUserTemplate")
    Result deleteUserTemplate(@RequestParam("templateId") String templateId[],
                              @RequestParam("type") Integer type);

    @RequestMapping("/jurisdiction/queryStudentAttendCount")
    Result queryStudentAttendCount(@RequestParam(value = "attendGroupId") String attendGroupId,
                                   @RequestParam(value = "dateTime") String dateTime,
                                   @RequestParam(value = "classId", required = false) String classId);

    @RequestMapping("/jurisdiction/attendGroupClass")
    Result attendGroupClass(@RequestParam(value = "attendGroupId") String attendGroupId);

    @RequestMapping("/jurisdiction/findSignedUpActivity")
    Result findSignedUpActivity(@RequestParam(value = "studentId") Integer studentId,
                                @RequestParam(value = "type", required = false, defaultValue = "0") Integer type,
                                @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                @RequestParam(value = "rows", required = false, defaultValue = "10") Integer rows);

    @RequestMapping("/jurisdiction/activitySignUpOrCancel")
    Result activitySignUpOrCancel(@RequestParam(value = "studentId") String studentId,
                                  @RequestParam(value = "id") Integer id,
                                  @RequestParam(value = "type") Integer type);

    @RequestMapping("/jurisdiction/queryClassSize")
    Result queryClassSize();

    @RequestMapping("/jurisdiction/queryClassStanza")
    Result queryClassStanza(@RequestParam(value = "classId") Integer classId,//班级id
                            @RequestParam(value = "time", required = false) String time);

    @RequestMapping("/jurisdiction/queryClassStudent")
    Result queryClassStudent(@RequestParam(value = "classId") Integer classId,//班级id
                             @RequestParam(value = "time") String time,//节次时间
                             @RequestParam(value = "id") Integer id,
                             @RequestParam(value = "name", required = false) String name);

    @RequestMapping("/jurisdiction/batchAddClassAttend")
    Result batchAddClassAttend(@RequestParam(value = "list") String list,//学生课堂点名信息
                               @RequestParam(value = "id") Integer id);

    @RequestMapping("/jurisdiction/querySchoolStanza")
    Result querySchoolStanza(@RequestParam(value = "time") String time);

    @RequestMapping("/jurisdiction/queryClassStanzaList")
    Result queryClassStanzaList(@RequestParam(value = "classId") Integer classId,//班级id
                                @RequestParam(value = "time") String time);

    @RequestMapping("/jurisdiction/queryClassStanzaCount")
    Result queryClassStanzaCount(@RequestParam(value = "id", required = false) Integer id,//节次id
                                 @RequestParam(value = "time") String time);

    @RequestMapping("/jurisdiction/queryStanzaStudentId")
    Result queryStanzaStudentId(@RequestParam(value = "studentId") Integer studentId,//学生id
                                @RequestParam(value = "time") String time);

    @RequestMapping("/jurisdiction/queryStanzaStudentIdCount")
    Result queryStanzaStudentIdCount(@RequestParam(value = "studentId") Integer studentId,//学生id
                                     @RequestParam(value = "type", defaultValue = "1") Integer type,//type 1 当天 2本周 3上周 4本月 5自定义时间
                                     @RequestParam(value = "startTime", required = false) String startTime,//开始时间
                                     @RequestParam(value = "endTime", required = false) String endTime);

    @RequestMapping("/jurisdiction/queryManageClassByTeacherId")
    Result queryManageClassByTeacherId();

    @RequestMapping("/jurisdiction/updateManageClassId")
    Result updateManageClassId(@RequestParam(value = "classId") Integer classId,
                               @RequestParam(value = "state") Integer state);

    @RequestMapping("/jurisdiction/findParentQuestionnaire")
    Result findParentQuestionnaire(@RequestParam(value = "studentId", required = false) Integer studentId,
                                   @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                   @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    @RequestMapping("/jurisdiction/addQuestionnaireUsersAnswer")
    Result addQuestionnaireUsersAnswer(QuestionnaireUsersAnswer questionnaireUsersAnswer);

    @RequestMapping("/jurisdiction/findActivityDetails")
    Result findActivityDetails(@RequestParam(value = "id") Integer id,
                               @RequestParam(value = "studentId") Integer studentId);

    /**
     * 教师添加奖品
     *
     * @param prize 奖品
     * @return
     */
    @RequestMapping("/jurisdiction/addPrize")
    Result addPrize(Prize prize);

    /**
     * 查询教师发布的奖品
     *
     * @param indexNo
     * @param rows
     * @return
     */
    @RequestMapping("/jurisdiction/findTeacherPrize")
    Result findTeacherPrize(@RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                            @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    /**
     * 查询教师发布的奖品兑换信息
     *
     * @return
     */
    @RequestMapping("/jurisdiction/findTeacherPrizeRecord")
    Result findTeacherPrizeRecord(@RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                  @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    /**
     * 撤销或确认奖品记录
     *
     * @param recordId 兑换记录id
     * @param state    0学生已兑换,1已撤销,2教师已确定
     * @return
     */
    @RequestMapping("/jurisdiction/updatePrizeRecordState")
    Result updatePrizeRecordState(@RequestParam(value = "recordId") Integer recordId,
                                  @RequestParam(value = "state") Integer state);

    /**
     * 下架奖品
     *
     * @param id
     * @return
     */
    @RequestMapping("/jurisdiction/dismountPrize")
    Result dismountPrize(@RequestParam(value = "id") Integer id);

    /**
     * 奖品兑换记录查看
     *
     * @param recordId 记录id
     * @return
     */
    @RequestMapping("/jurisdiction/viewRecords")
    Result viewRecords(@RequestParam(value = "recordId") Integer[] recordId);

    /**
     * 添加班级德育项
     *
     * @param meMoralEducation
     * @return
     */
    @RequestMapping("/jurisdiction/addMoraleEducation")
    Result addMoraleEducation(MeMoralEducation meMoralEducation);

    /**
     * 查询班级德育项
     *
     * @return
     */
    @RequestMapping("/jurisdiction/findMoraleEducation")
    Result findMoraleEducation();

    /**
     * 添加班级德育记录
     *
     * @param meMoralEducationRecord
     * @return
     */
    @RequestMapping("/jurisdiction/addMeMoralEducationRecord")
    Result addMeMoralEducationRecord(MeMoralEducationRecord meMoralEducationRecord);

    /**
     * 查询班级德育记录
     *
     * @param findType  0本周,1上周,2本月,3自定义
     * @param startTime 开始时间
     * @param endTime   结束时间
     * @param classId   班级id
     * @param indexNo   页码
     * @param rows      每页显示数量
     * @return
     */
    @RequestMapping("/jurisdiction/findMeMoralEducationRecord")
    Result findMeMoralEducationRecord(@RequestParam(value = "findType", required = false, defaultValue = "0") Integer findType,
                                      @RequestParam(value = "startTime", required = false) String startTime,
                                      @RequestParam(value = "endTime", required = false) String endTime,
                                      @RequestParam(value = "classId", required = false) String classId,
                                      @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                      @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);


    /**
     * 添加事件倒计时
     *
     * @param oiCountdown
     * @return
     */
    @RequestMapping("/jurisdiction/addOiCountdown")
    Result addOiCountdown(OiCountdown oiCountdown);

    /**
     * 按班级查询事件倒计时记录
     *
     * @param classId
     * @return
     */
    @RequestMapping("/jurisdiction/findClassOiCountdown")
    Result findClassOiCountdown(@RequestParam(value = "classId", required = false) Integer classId,
                                @RequestParam(value = "indexNo", required = false, defaultValue = "1") Integer indexNo,
                                @RequestParam(value = "rows", required = false, defaultValue = "20") Integer rows);

    /**
     * 事件倒计时删除
     *
     * @param id 事件倒计时id
     * @return
     */
    @RequestMapping("/jurisdiction/deleteOiCountdown")
    Result deleteOiCountdown(@RequestParam(value = "id") Integer id);

    /**
     * 事件置顶
     *
     * @param id 事件倒计时id
     * @return
     */
    @RequestMapping("/jurisdiction/deleteOiCountdown")
    Result OiCountdownTopping(@RequestParam(value = "id") Integer id,
                              @RequestParam(value = "classId") Integer classId);


    /**
     * 查询学生的体温
     *
     * @param time 要查询的时间
     * @return
     */
    @RequestMapping("/jurisdiction/findStudentTemperature")
    Result findStudentTemperature(@RequestParam(value = "time", required = false) String time);


    /**
     * 取消置顶
     *
     * @param id 事件倒计时id
     * @return
     */
    @RequestMapping("/jurisdiction/oiCountdownCancelTopping")
    Result oiCountdownCancelTopping(@RequestParam(value = "id") Integer id);

    /**
     * 查询学校德育标签
     *
     * @return
     */
    @RequestMapping("/jurisdiction/findMeMoralEducationLabel")
    Result findMeMoralEducationLabel();

    /**
     * 添加学校德育标签
     *
     * @param meMoralEducationLabel 德育标签
     * @return
     */
    @RequestMapping("/jurisdiction/addMeMoralEducationLabel")
    public Result addMeMoralEducationLabel(MeMoralEducationLabel meMoralEducationLabel);

    /**
     * 删除学校德育标签
     *
     * @param id 德育标签id
     * @return
     */
    @RequestMapping("/jurisdiction/deleteMeMoralEducationLabel")
    Result deleteMeMoralEducationLabel(@RequestParam(value = "id") Integer id);

    /**
     * 删除班级德育记录
     * @param id 德育记录id
     * @return
     */
    @RequestMapping("/jurisdiction/deleteMeMoralEducationRecord")
     Result deleteMeMoralEducationRecord(@RequestParam(value = "id") Integer id);

    /**
     * 删除德育项
     * @param id 德育项id
     * @return
     */
    @RequestMapping("/jurisdiction/deleteMoraleEducation")
    public Result deleteMoraleEducation(@RequestParam(value = "id") Integer id);
}
